<section *ngIf="showForm">
  <div nz-row>
    <div nz-col nzSpan="15">
      <div style="color: red;margin-bottom: 10px;margin-left: 150px;">提示: 手机号不是必填项，没有手机号无法登录小程序!</div>
    </div>
  </div>
  <div nz-row>
    <div nz-col nzSpan="8">
      <button nz-button nzType="primary" (click)="readIdCard()" style="margin-bottom: 10px;margin-left: 150px;">读取身份证</button>
      <button nz-button nzType="primary" (click)="takePhoto()">拍照</button>
    </div>
  </div>
    <div class="clearfix" nz-row>
      <!-- <h3 class="title" style="padding-bottom: 5px;margin-left: 8%;display: inline-block;vertical-align: top;">照片:</h3> -->
      <nz-form-item style="margin-bottom: 0;" nz-col nzSpan="8">
        <nz-form-label [nzSpan]="9" style="width: 150px;" nzFor="email">照片</nz-form-label>
        <nz-form-control [nzSpan]="9">
          <nz-upload
          class="avatar-uploader"
          nzName="avatar"
          nzListType="picture-card"
          [nzShowUploadList]="false"
          (nzChange)="handleChange($event)"
        >
          <ng-container *ngIf="!show">
            <i class="upload-icon" nz-icon nzType="plus"></i>
            <div class="ant-upload-text">Upload</div>
          </ng-container>
          <img *ngIf="show" [src]="avatarUrl" style="width: 100%;height:102px;object-fit: cover;" />
        </nz-upload>              
             
        </nz-form-control>
      </nz-form-item >
      
      <!-- <div style="display: inline-block;width:150px;height:150px;border: 1px dashed #ddd;margin-left: 13px;background: #fafafa;">
          <img [src]="src" alt="" *ngIf="show" style="width:100%;height: 100%;object-fit: cover;">
      </div> -->
     
      <nz-modal [nzVisible]="previewVisible" [nzContent]="modalContent" [nzFooter]="null" (nzOnCancel)="previewVisible = false">
        <ng-template #modalContent>
          <img [src]="previewImage" [ngStyle]="{ width: '100%' }" />
        </ng-template>
      </nz-modal>
    </div>



    <sf #sf  [formData]="param"  [schema]="schema" (formSubmit)="formSubmit($event)"></sf>
    
  </section>

